import { VxeFormItemProps, VxeGridPropTypes } from '@gui-pkg/antdcomponents';
import { h } from 'vue';
import { Tag } from 'ant-design-vue';
const townData = [

  {value: '大金镇', label: '大金镇'},
  {value: '四望镇', label: '四望镇'},
  {value: '梅川镇', label: '梅川镇'},
  {value: '花桥镇', label: '花桥镇'},
  {value: '田家镇街道', label: '田家镇街道'},
  {value: '余川镇', label: '余川镇'},
  {value: '大法寺镇', label: '大法寺镇'},
  {value: '刊江街道', label: '刊江街道'},
]
export const columns: VxeGridPropTypes.Columns = [
  {
    title: '雨量站',
    field: 'stnm',
    align: 'center',
    fixed: 'left',
    treeNode: true,
  },
  {
    title: '时间',
    field: 'tm',
    align: 'center',
  },
  {
    title: '小时累计降雨量(mm)',
    field: 'ph',
    align: 'center',
  },
  {
    title: '日累计降雨量(mm)',
    field: 'pd',
    align: 'center',
  },
  {
    title: '镇',
    field: 'town',
    align: 'center',
  },
  {
    title: '责任人',
    field: 'contacts',
    align: 'center',
  },
  {
    title: '联系方式',
    field: 'contactsPhone',
    align: 'center',
  },
  {
    title: '管理单位',
    field: 'contactsPosition',
    align: 'center',
  },
  {
    width: 120,
    title: '操作',
    align: 'center',
    slots: { default: 'action' },
    fixed: 'right',
  },
];

export const searchFormSchema: VxeFormItemProps[] = [
  {
    field: 'stnm',
    title: '测站名称',
    itemRender: {
      name: 'AInput',
    },
    span: 6,
  },
  {
    field: 'town',
    title: '镇',
    itemRender: {
      name: 'ASelect',
      props: {
        options: townData,
      },
    },
    span: 6,
  },
  // {
  //   field: 'tm',
  //   title: '监测时间',
  //   itemRender: {
  //     name: 'ARangePicker',
  //     props: {
  //       format: 'YYYY-MM-DD HH:mm:ss',
  //       showTime: true
  //     },
  //   },
  //   span: 6,
  // },
  {
    span: 12,
    align: 'right',
    className: '!pr-0',
    itemRender: {
      name: 'AButtonGroup',
      children: [
        {
          props: { type: 'primary', content: '查询', htmlType: 'submit' },
          attrs: { class: 'mr-2' },
        },
        { props: { type: 'default', htmlType: 'reset', content: '重置' } },
      ],
    },
  },
];
